package cn.xk.ymcc.feign.fallback;


import cn.xk.ymcc.feign.UaaFeignClient;
import cn.xk.ymcc.result.JSONResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UaaFeignClientFallBack implements FallbackFactory<UaaFeignClient> {

    @Override
    public UaaFeignClient create(Throwable throwable) {
        return login -> JSONResult.error("认证服务不可用");
    }
}
